import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Person implements  Cloneable{
     //私有属性

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    private String name = "Tom";
     //公有属性
     public int age = 18;
    public int a1 = 18;
    public int a2 = 18;
    public int a3= 18;public int a4 = 18;

     //构造方法
     public Person() {
     }
    //私有方法
    private void say(){
        System.out.println("private say()...");
    }
    //公有方法
    public void work(){
        System.out.println("public work()...");
    }

     public static void main(String[] args) throws CloneNotSupportedException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
             Person p1=new Person();
             Class c=p1.getClass();
         System.out.println(c);
         Class c2=Person.class;
         System.out.println(c2);
         Field[] f=p1.getClass().getFields();
         System.out.println(f);
         Field[] f1=Person.class.getFields();
         for (Field x :
                 f) {
             System.out.println(x);
         }
         Object p2=p1.clone();
         System.out.println("****************");
         Person person5=Person.class.getConstructor().newInstance();
         System.out.println(person5);

     }
}